<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('学生测评列表')"/>
    <th:block th:include="include :: summernote-css"/>
    <th:block th:include="include :: select2-css"/>
    <th:block th:include="include :: bootstrap-select-css"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="notice-form">
                <div class="select-list">
                    <ul>
                        <input id="childId" name="childId" type="hidden" th:value="${childId}"/>
                        <input id="evaluateNumber" name="evaluateNumber" type="hidden" th:value="${evaluateNumber}"/>

                    </ul>
                </div>
            </form>
        </div>

        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: summernote-js"/>
<th:block th:include="include :: select2-js"/>
<th:block th:include="include :: bootstrap-select-js"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    // 权限

    // 字典
    var projectType = [[${@dict.getType('business_project_type')}]];
    var trainingModule = [[${@dict.getType('business_training_module')}]];
    var prefix = ctx + "business/childReport";

    $(function () {
        var options = {
            url: ctx + "education/childtrainingProgram/findByChildAndEvaluate",
            modalName: "数据",
            // queryParams: queryParams,
            columns: [{
                checkbox: true
            },
                {
                    field: 'projectType',
                    title: '课程名称',
                    formatter: function (value, row, index) {
                        var actions = [];
                        $.each(projectType, function (index, dict) {
                            if (dict.dictValue == ('' + value)) {
                                actions.push($.common.sprintf("<span>%s</span>", dict.dictLabel));
                                return false;
                            }
                        });
                        return actions.join('');
                    }
                },
                {
                    field: 'trainingModule',
                    title: '训练目标',
                    formatter: function (value, row, index) {
                        var actions = [];
                        $.each(trainingModule, function (index, dict) {
                            if (dict.dictValue == ('' + value)) {
                                actions.push($.common.sprintf("<span>%s</span>", dict.dictLabel));
                                return false;
                            }
                        });
                        return actions.join('');
                    }
                },
                {
                    field: 'trainingName',
                    title: '训练项目名称',
                },
                {
                    field: 'trainingContent',
                    title: '训练项目描述',
                }

            ]
        };
        $.table.init(options);
    });


    function queryParams(params) {
        var search = $.table.queryParams(params);
        var childId = $("#childId").val();
        search.childId = childId;
        return search;
    }


</script>
</body>

</html>